extends ./index.jade

block content
	.rightSide
		.container-fluid
			//- .row.clearfix
			//- 	a(href="add_goods.html").pull-right.btn.btn-success 上架商品
			.row
				label 选择你要操作的食堂
				span.managerOnly
					select#schoolSelect
				select#shopSelect
				a.btn.btn-primary.goodsQuery.marginLeft 查询
			.row
				table(id='goodsList').table.table-hover.table-bordered.center
					
			.row.text-right.forcedVerticalCenter
				#paginator.paginator 分页
				span.marginLeft.marginRight
					|共
					span#total
					|条记录

	script(type='text/x-dot-template' id='schoolTmpl')
		{{~it:school}}
		option(value='{{=school.id}}') {{=school.name}}
		{{~}}
	script(type='text/x-dot-template' id='shopTmpl')
		{{~it:shop}}
		option(value='{{=shop.id}}') {{=shop.name}}
		{{~}}
	script(id='goodsTmpl' type='text/x-dot-template')
		thead
			th 商品
			th 名称
			th 价格
			th 简介
			th 有赞地址
			th 操作
		tbody
			{{~it:goods}}
			tr
				td 
					img(src="{{=goods.item_main_img}}").previewImgSmall
				td {{=goods.item_name}}
				td {{=goods.item_price}}
				td 
					{{? goods.info}}
					{{=goods.info}}
					{{??}}
					|暂无
					{{?}}
				td 
					a(href="{{=goods.item_buy_url}}") 点击进入有赞地址
				td 
					a(data-id="{{=goods.num_iid}}").btn.btn-danger.removeGoods 删除
			{{~}}
	link(rel='stylesheet' href='/css/lib/select2.min.css')
	script(src='/js/lib/require.js' data-main='/js/goods_manage')